package com.guodefu.sensitive.handler;

import com.guodefu.sensitive.config.SensitiveStrategy;

public class BankCardSensitiveStrategy implements SensitiveStrategy {
    @Override
    public String mask(String idCard, String maskString) {
        if (idCard.length() <= 8) {
            return maskString;
        }
        return idCard.substring(0, 4) + maskString + idCard.substring(idCard.length() - 4);
    }
}